home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3c / strftime.z / strftime
Encoding:
Text File  |  1998-10-20  |  12.2 KB  |  198 lines

  1.  
  2.  
  3.  
  4. ssssttttrrrrffffttttiiiimmmmeeee((((3333CCCC))))                                                      ssssttttrrrrffffttttiiiimmmmeeee((((3333CCCC))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _ssss_tttt_rrrr_ffff_tttt_iiii_mmmm_eeee, _cccc_ffff_tttt_iiii_mmmm_eeee, _aaaa_ssss_cccc_ffff_tttt_iiii_mmmm_eeee - convert date and time to string
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_tttt_iiii_mmmm_eeee_...._hhhh_>>>>
  13.  
  14.      _ssss_iiii_zzzz_eeee______tttt _ssss_tttt_rrrr_ffff_tttt_iiii_mmmm_eeee _((((_cccc_hhhh_aaaa_rrrr _****_ssss_,,,, _ssss_iiii_zzzz_eeee______tttt _mmmm_aaaa_xxxx_ssss_iiii_zzzz_eeee_,,,, _cccc_oooo_nnnn_ssss_tttt _cccc_hhhh_aaaa_rrrr _****_ffff_oooo_rrrr_mmmm_aaaa_tttt_,,,,
  15.          _cccc_oooo_nnnn_ssss_tttt _ssss_tttt_rrrr_uuuu_cccc_tttt _tttt_mmmm _****_tttt_iiii_mmmm_eeee_pppp_tttt_rrrr_))))_;;;;
  16.  
  17.      _iiii_nnnn_tttt _cccc_ffff_tttt_iiii_mmmm_eeee _((((_cccc_hhhh_aaaa_rrrr _****_ssss_,,,, _cccc_hhhh_aaaa_rrrr _****_ffff_oooo_rrrr_mmmm_aaaa_tttt_,,,, _cccc_oooo_nnnn_ssss_tttt _tttt_iiii_mmmm_eeee______tttt _****_cccc_llll_oooo_cccc_kkkk_))))_;;;;
  18.  
  19.      _iiii_nnnn_tttt _aaaa_ssss_cccc_ffff_tttt_iiii_mmmm_eeee _((((_cccc_hhhh_aaaa_rrrr _****_ssss_,,,, _cccc_oooo_nnnn_ssss_tttt _cccc_hhhh_aaaa_rrrr _****_ffff_oooo_rrrr_mmmm_aaaa_tttt_,,,, _cccc_oooo_nnnn_ssss_tttt _ssss_tttt_rrrr_uuuu_cccc_tttt _tttt_mmmm
  20.          _****_tttt_iiii_mmmm_eeee_pppp_tttt_rrrr_))))_;;;;
  21.  
  22. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  23.      _ssss_tttt_rrrr_ffff_tttt_iiii_mmmm_eeee, _aaaa_ssss_cccc_ffff_tttt_iiii_mmmm_eeee, and _cccc_ffff_tttt_iiii_mmmm_eeee place characters into the array pointed to
  24.      by _ssss as controlled by the string pointed to by _f_o_r_m_a_t.  The _f_o_r_m_a_t string
  25.      consists of zero or more directives and ordinary characters.  All
  26.      ordinary characters (including the terminating null character) are copied
  27.      unchanged into the array.  For _ssss_tttt_rrrr_ffff_tttt_iiii_mmmm_eeee, no more than _m_a_x_s_i_z_e characters
  28.      are placed into the array.
  29.  
  30.      If _f_o_r_m_a_t is (char *)0, then the locale's default format is used.  For
  31.      _ssss_tttt_rrrr_ffff_tttt_iiii_mmmm_eeee the default format is the same as _""""_%%%%_KKKK_CCCC_"""", for _cccc_ffff_tttt_iiii_mmmm_eeee and _aaaa_ssss_cccc_ffff_tttt_iiii_mmmm_eeee
  32.      the default format is the same as _""""_%%%%_KKKK_CCCC_"""".  _cccc_ffff_tttt_iiii_mmmm_eeee and _aaaa_ssss_cccc_ffff_tttt_iiii_mmmm_eeee first try
  33.      to use the value of the environment variable _CCCC_FFFF_TTTT_IIII_MMMM_EEEE, and if that is
  34.      undefined or empty, the default format is used.
  35.  
  36.      Each directive is replaced by appropriate characters as described in the
  37.      following list.  The appropriate characters are determined by the _LLLL_CCCC______TTTT_IIII_MMMM_EEEE
  38.      category of the program's locale and by the values contained in the
  39.      structure pointed to by _t_i_m_e_p_t_r for _ssss_tttt_rrrr_ffff_tttt_iiii_mmmm_eeee and _aaaa_ssss_cccc_ffff_tttt_iiii_mmmm_eeee, and by the
  40.      time represented by _c_l_o_c_k for _cccc_ffff_tttt_iiii_mmmm_eeee.
  41.  
  42.      _%%%%_%%%%        same as %
  43.      _%%%%_aaaa        locale's abbreviated weekday name
  44.      _%%%%_AAAA        locale's full weekday name
  45.      _%%%%_bbbb        locale's abbreviated month name
  46.      _%%%%_BBBB        locale's full month name
  47.      _%%%%_cccc        locale's appropriate date and time representation
  48.      _%%%%_CCCC        century number (the year divided by 100 and truncated to an
  49.                integer) as a decimal number [00-99]
  50.      _%%%%_dddd        day of month ( 01 - 31 )
  51.      _%%%%_DDDD        date as _%%%%_mmmm_////_%%%%_dddd_////_%%%%_yyyy
  52.      _%%%%_eeee        day of month (1-31; single digits are preceded by a blank)
  53.      _%%%%_hhhh        locale's abbreviated month name.
  54.      _%%%%_HHHH        hour ( 00 - 23 )
  55.      _%%%%_IIII        hour ( 01 - 12 )
  56.      _%%%%_jjjj        day number of year ( 001 - 366 )
  57.      _%%%%_KKKK_CCCC       locale's appropriate date and time representation
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ssssttttrrrrffffttttiiiimmmmeeee((((3333CCCC))))                                                      ssssttttrrrrffffttttiiiimmmmeeee((((3333CCCC))))
  71.  
  72.  
  73.  
  74.      _%%%%_mmmm        month number ( 01 - 12 )
  75.      _%%%%_MMMM        minute ( 00 - 59 )
  76.      _%%%%_nnnn        same as new-line
  77.      _%%%%_pppp        locale's equivalent of either AM or PM
  78.      _%%%%_rrrr        locale's 12-hour time representation, default _%%%%_IIII_::::_%%%%_MMMM_::::_%%%%_SSSS [_AAAA_MMMM|_PPPP_MMMM]
  79.      _%%%%_RRRR        time as _%%%%_HHHH_::::_%%%%_MMMM
  80.      _%%%%_SSSS        seconds ( 00 - 61 ), allows for leap seconds
  81.      _%%%%_tttt        same as a tab
  82.      _%%%%_TTTT        time as _%%%%_HHHH_::::_%%%%_MMMM_::::_%%%%_SSSS
  83.      _%%%%_UUUU        week number of year ( 00 - 53 ), Sunday is the first day of
  84.                week 1
  85.      _%%%%_wwww        weekday number ( 0 - 6 ), Sunday = 0
  86.      _%%%%_WWWW        week number of year ( 00 - 53 ), Monday is the first day of
  87.                week 1
  88.      _%%%%_xxxx        locale's appropriate date representation
  89.      _%%%%_XXXX        locale's appropriate time representation
  90.      _%%%%_yyyy        year within century ( 00 - 99 )
  91.      _%%%%_YYYY        year as ccyy ( e.g. 1986)
  92.      _%%%%_ZZZZ        time zone name or no characters if no time zone exists
  93.  
  94.      The difference between _%%%%_UUUU and _%%%%_WWWW lies in which day is counted as the
  95.      first of the week.  Week number 01 is the first week in January starting
  96.      with a Sunday for _%%%%_UUUU or a Monday for _%%%%_WWWW.  Week number 00 contains those
  97.      days before the first Sunday or Monday in January for _%%%%_UUUU and _%%%%_WWWW,
  98.      respectively.
  99.  
  100.      _ssss_tttt_rrrr_ffff_tttt_iiii_mmmm_eeee, _cccc_ffff_tttt_iiii_mmmm_eeee, and _aaaa_ssss_cccc_ffff_tttt_iiii_mmmm_eeee return the number of characters placed
  101.      into the array pointed to by _s not including the terminating null
  102.      character.  (If more than _m_a_x_s_i_z_e characters would have been placed into
  103.      the array, _ssss_tttt_rrrr_ffff_tttt_iiii_mmmm_eeee returns zero and the array content is indeterminate.
  104.      If _ssss_tttt_rrrr_ffff_tttt_iiii_mmmm_eeee, _cccc_ffff_tttt_iiii_mmmm_eeee, or _aaaa_ssss_cccc_ffff_tttt_iiii_mmmm_eeee overrun the size of the array, the
  105.      behavior is undefined.)
  106.  
  107.    SSSSeeeelllleeeeccccttttiiiinnnngggg tttthhhheeee OOOOuuuuttttppppuuuutttt''''ssss LLLLaaaannnngggguuuuaaaaggggeeee
  108.      By default, the output of _ssss_tttt_rrrr_ffff_tttt_iiii_mmmm_eeee, _cccc_ffff_tttt_iiii_mmmm_eeee, and _aaaa_ssss_cccc_ffff_tttt_iiii_mmmm_eeee appear in U.S.
  109.      English.  The user can request that the output of _ssss_tttt_rrrr_ffff_tttt_iiii_mmmm_eeee, _cccc_ffff_tttt_iiii_mmmm_eeee, or
  110.      _aaaa_ssss_cccc_ffff_tttt_iiii_mmmm_eeee be in a specific language by setting the _l_o_c_a_l_e for _c_a_t_e_g_o_r_y
  111.      _LLLL_CCCC______TTTT_IIII_MMMM_EEEE in _ssss_eeee_tttt_llll_oooo_cccc_aaaa_llll_eeee.
  112.  
  113.    TTTTiiiimmmmeeeezzzzoooonnnneeee
  114.      The timezone is taken from the environment variable _TTTT_ZZZZ [see _cccc_tttt_iiii_mmmm_eeee(3C) for
  115.      a description of _TTTT_ZZZZ].
  116.  
  117. EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  118.      The example illustrates the use of _ssss_tttt_rrrr_ffff_tttt_iiii_mmmm_eeee.  It shows what the string in
  119.      _ssss_tttt_rrrr would look like if the structure pointed to by _t_m_p_t_r contains the
  120.      values corresponding to Thursday, August 28, 1986 at 12:44:36 in New
  121.      Jersey.
  122.                _ssss_tttt_rrrr_ffff_tttt_iiii_mmmm_eeee _((((_ssss_tttt_rrrr_,,,, _ssss_tttt_rrrr_ssss_iiii_zzzz_eeee_,,,, _""""_%%%%_AAAA _%%%%_bbbb _%%%%_dddd _%%%%_jjjj_""""_,,,, _tttt_mmmm_pppp_tttt_rrrr_))))
  123.      This results in _ssss_tttt_rrrr containing _""""_TTTT_hhhh_uuuu_rrrr_ssss_dddd_aaaa_yyyy _AAAA_uuuu_gggg _2222_8888 _2222_4444_0000_"""".
  124.  
  125.  
  126.  
  127.  
  128.                                                                         PPPPaaaaggggeeee 2222
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135. ssssttttrrrrffffttttiiiimmmmeeee((((3333CCCC))))                                                      ssssttttrrrrffffttttiiiimmmmeeee((((3333CCCC))))
  136.  
  137.  
  138.  
  139. FFFFIIIILLLLEEEESSSS
  140.      _////_uuuu_ssss_rrrr_////_llll_iiii_bbbb_////_llll_oooo_cccc_aaaa_llll_eeee_////_l_o_c_a_l_e_////_LLLL_CCCC______TTTT_IIII_MMMM_EEEE - file containing locale-specific date and
  141.      time information
  142.  
  143. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  144.      _tttt_iiii_mmmm_eeee_((((_2222_)))), _cccc_tttt_iiii_mmmm_eeee(3C), _gggg_eeee_tttt_eeee_nnnn_vvvv(3C), _ssss_eeee_tttt_llll_oooo_cccc_aaaa_llll_eeee(3C), _ssss_tttt_rrrr_ffff_tttt_iiii_mmmm_eeee(4), _tttt_iiii_mmmm_eeee_zzzz_oooo_nnnn_eeee(4),
  145.      _eeee_nnnn_vvvv_iiii_rrrr_oooo_nnnn(5).
  146.  
  147. NNNNOOOOTTTTEEEE
  148.      _cccc_ffff_tttt_iiii_mmmm_eeee and _aaaa_ssss_cccc_ffff_tttt_iiii_mmmm_eeee are obsolete.  _ssss_tttt_rrrr_ffff_tttt_iiii_mmmm_eeee should be used instead.
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.                                                                         PPPPaaaaggggeeee 3333
  195.  
  196.  
  197.  
  198.